<?php

declare(strict_types=1);
/**
 * 创建人 : Forpastime
 *
 * @link     http://hypercmf.com
 * @document https://hyperf.wiki
 * @contact  forpastime@qq.com
 * @git  https://gitee.com/hypercmf/hypercmf1.0.git
 */
namespace App\JsonRpc;

use Forpastime\Hyperf\interfaces\CalculatorServiceInterface;
use Hyperf\RpcServer\Annotation\RpcService;

/**
 * 这里demo下的注解前面的“@”去掉了，如果配置了Nacos可以将注解生效进行测试
 * RpcService(name="CalculatorService", protocol="jsonrpc-http", server="jsonrpc-http", publishTo="nacos")
 */
class CalculatorService implements CalculatorServiceInterface
{
    public function add(int $a, int $b): int
    {
        return $a + $b;
    }
}
